Hi guys,
logfile = write("h:\\logFile.csv")
.
.
.
logfile << dateAndTime(today) ";SET '" access "' for '" itemName "'\n"
ManuelFelger - Mon May 11 10:30:38 EDT 2009 |
Re: How to use 'append' ? logfile = append("h:\\logFile.csv") ? |
Re: How to use 'append' ? SystemAdmin - Mon May 11 10:46:34 EDT 2009
I've found out, its: append(logFile, 437) << dateAndTime(today) ";Target '" itemName "' is not a Module!\n" |
Re: How to use 'append' ?
Don't forget to close the stream, and therefore the file. Here is my function to do it. I see I should adjust the comments.
//************************
bool fAppendFile(string FileContents, string NameFile)
{ // Append the message to the end of the File.
// User should presumably add '\n' to the beginning
// or end of the FileContents.
Stream Output
noError()
Output = append(NameFile)
string ErrMess = lastError()
if (null ErrMess)
{ Output << FileContents
flush(Output)
close Output
return(true)
}
else
{ return(false)
}
} // end fAppendFile()
|